package com.bwie.controller;

import com.bwie.pojo.TbUser;
import com.bwie.service.TbUserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginVo;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: server-week2
 * @package: com.bwie.controller
 * @className: IndexController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/7/3 9:33
 * @version: 1.0
 */

@RestController
@RequestMapping("/user/index")
public class IndexController {


    @Autowired
    TbUserService tbUserService;


    /**
     * @param loginVo:
     * @return R
     * @author :杨珂
     * @description 登录
     * @date 2025/7/3 11:51
     */
    @PostMapping("/login")
    public R login(@RequestBody LoginVo loginVo) {
        return tbUserService.login(loginVo);
    }


}
